home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / netconnect3 / microdot-ii-14 / install_microdot-ii < prev    next >
Text File  |  1999-12-26  |  31KB  |  715 lines

  1. ;********************************************************************************
  2. ;      _   _   __                       ____           __          ______ ______
  3. ;     / \_/ \ /_/                      / __ \        _/ /_        /_  __//_  __/
  4. ;    / \__/ /__   ______ _____ ______ / / / /______ /  __/         / /    / /
  5. ;   / /  / // /  / ____// .__// __  // / / // __  / / /  ______   / /    / /
  6. ;  / /  / // /_ / /___ / /   / /_/ // /_/ // /_/ / / /_ /_____/__/ /_ __/ /_
  7. ; /_/  /_//___//_____//_/   /_____//_____//_____/ /___/       /_____//_____/
  8. ;                                                                      
  9. ; $VER: MD2_Installer 0.28pizza (24-January-1998) 
  10. ; MicroDot-I ©1993, 1994, 1995, 1996, 1997, 1998, 1999 by Oliver Wagner
  11. ; MicroDot-II Installer by Robert C. Reiswig ©1998, 1999 
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. You may NOT change this in an way!
  15. ; Changes, suggestions or problems: md2@vgr.com or rob@vapor.com
  16. ;********************************************************************************
  17.  
  18. ;*** System Stuff ***
  19. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  20. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  21. (set osver (/ (getversion "LIBS:version.library") 65536))
  22. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  23. (set fastmem (- totmem graphmem))
  24.  
  25. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  26. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  27. (if (= osver 41) (set workbench "4.0")) 
  28.  
  29. (set cpu (database "cpu"))
  30. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  31. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  32. (if (= cpu 68040) (set #cpu 4)) 
  33. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  34.  
  35. (set vernum1 (getversion "MicroDot"))
  36. (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  37. (set MicroDotver (cat ver1 "." rev1))
  38.  
  39. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  40. (set lan 0)
  41.  
  42. (if (= "english" lanfound) (set lan 0))  (if (= "deutsch"  lanfound) (set lan 1))
  43. (if (= "français" lanfound) (set lan 2)) (if (= "Español" lanfound) (set lan 3))
  44. (if (= "Svenska" lanfound) (set lan 4))  (if (= "nederlands" lanfound) (set lan 5))
  45. (if (= "italiano" lanfound) (set lan 6)) (if (= "norsk"  lanfound) (set lan 7))
  46. (if (= "português" lanfound) (set lan 8))
  47.  
  48. (set #English    "English")  (set #Deutsch    "Deutsch")
  49. (set #Français   "Français") (set #Español    "Español")
  50. (set #Svenska    "Svenska")  (set #Nederlands "Nederlands")
  51. (set #Italiano   "Italiano") (set #Norsk      "Norsk")    
  52. (set #Português  "Português")
  53.  
  54. (set mfound 0) (set newicon1 1) 
  55. (set keeper 1) (set firsttime 0)
  56.  
  57. ;********************************************************************
  58. ; English Strings
  59. ;********************************************************************
  60. (set #about (cat "\n\nWelcome to MicroDot-II " MicroDotver "\n\nCopyright © 1993-1999 by\n\nOliver Wagner\n<owagner@vapor.com>\n\nhttp://www.vapor.com/\nftp://ftp.vapor.com/pub/microdot-2/") )
  61. (set #nomui (cat "\n\nMicroDot uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  62.                  "therefore you MicroDot will not work correctly.  You will need to install "
  63.                  "MUI before running MicroDot."
  64.             )
  65. )
  66. (set #whereMicroDot "Where do you wish to install MicroDot2. A directory called 'MicroDot2' will be created if one is not there. If a copy of MicroDot2 is found it will be backed up.")
  67. (set muiver "No Version Installed")
  68. (set #newermui "\nMicroDot needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui38usr.lha on Aminet in util/libs\n\nIt looks like you have: \n\n")
  69. (set #need-os "\n\nThe 68020 version of MicroDot needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  70. (set #000used "\n\nThe 68000 version will be installed.") 
  71. (set #filethere1 "\n\nThe installer has found MicroDot version ")
  72. (set #filethere2 " at ")
  73. (set #filethere3 "\n\nThe file will be renamed to ")
  74. (set #filethere4 " and it will then be moved to ")
  75. (set #backuptoXXX "Back-UP to file named 'MicroDot2")
  76. (set #copyover "Copy Over Old Version")
  77. (set #MicroDotfound "\nThe Installer has found a copy of MicroDot2 already installed. What do you want to do?\n")
  78. (set #askcpu "\nWhat version of MicroDot-II would you like to install?\n")
  79. (set #no020found "\n\nThe 68020 Version of MicroDot-II, MicroDot020, was not found in this archive this is why the 68000 version was installed.")
  80. (set #newicon "\nDo you wish to copy over The MicroDot Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  81. (set #nonewicon  "No  - ToolTypes already set.")
  82. (set #yesnewicon "Yes - Copy over Icon.")
  83. (set #pickicon "\nMicroDot has 3 different icons you can use choose from. Which one would you like to use?\n")
  84. (set #nomultiview (cat "The installer could not find multiview or you are running on a 2.x Amiga. "
  85.                        "The MicroDot Installer will let you choose between 3 different icon to use. Their "
  86.                        "names are:\n\n'MicroDot - Default'\n'MicroDot2 - Globe'\n'MicroDot3 - 4 Faces'\n\n"
  87.                        "You can use a picture viewer to look at the '3Icons.iff' to see the choices side-by-side, "
  88.                        "or you can just look in the drawer from where you are installing MicroDot from."
  89.                   )
  90. )
  91. (set #whatcat "Select the MicroDot Language catalog you wish to install.")
  92. (set #wherecat "\nWhere do you wish to install the MicroDot Language Catalog? Default is ")
  93. (set #catnofind "Can not find this catalog in this MicroDot archive. You may need to get the complete archive from the support site.")
  94. (set #whatdocs "\nWhat MicroDot documentation would you like to install?\n")
  95. (set #wheredocs "Where would you like the MicroDot documentation you selected to be installed?")
  96. (set #nofounddocs "\n\nThe Docs that are listed below, from the ones that you selected,  were not found in the MicroDot archive. You may need to get the complete archive from the support site.")
  97.  
  98. (set #oktodelete1 "\nIs it ok to delete the older MicroDot binary so that the MicroDot Directory can be made?\n")
  99. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ MicroDot binary so that the MicroDot Directory can be made?\n")
  100. (set #ifyoulike (cat "\n\nIf you like MicroDot you might want to take a look at AmFTP.  It Includes the following:\n\nHigh speed asynchronous transfers for maximum efficiency, "
  101.                      "Batch download facility, Resume partially received files, FTP-Server Phonebook, Full ADT Support, Full ARexx support, Archie search engine, "
  102.                      "and much more!\n\nAmFTP can be found on Aminet in comm/tcp or\nhttp://www.vapor.com/amftp/"
  103.                 )
  104. )
  105. (set #byebye (cat "\nMicroDot Install Complete!\n\n" ))
  106.  
  107. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  108. (set #newermui "\nMicroDot needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find the new MUI on Aminet in util/libs\n\nIt looks like you have: \n\n")
  109. (set #nompc "\nThe .MCC files for MicroDot can not be installed to 'mui:libs/mui'")
  110.  
  111. (set #insregstuff " Install Register information")
  112. (set #insregstuffno " Don't Install Register information")
  113. (set #installerreg "\nThe installer did not find an MicroDot key in the usual places. Do you wish to install the Register information?\n") 
  114.  
  115. (set #wheremp "\nWhere do you wish to install the MimePrefs program?\n")
  116.  
  117. (set #updatedlibs "\nInstall/Update the Vapor Libraries?\n* = Must be installed to work correctly\n(Click 'Help' for more info on the libs.)\n")
  118. (set #lib1 " Update library")
  119. (set #lib2 " Toolkit library (*)")
  120. (set #lib3 " Registration library (*)")
  121. (set #libhelp1 "vapor_update.library:\nIf installed every Vapor app will automagically check for updates by querying the Vapor server via Internet. You will be informed and offered automatic downloading if there is an update.")
  122. (set #libhelp2 "\n\nvapor_toolkit.library (* Must be installed):\nContains support functions which are used by most Vapor applications and thus can be shared to reduce individual application code size. ie: Async I/O library, crytographically strong random number generator, math support.")
  123. (set #libhelp3 "\n\nvapor_registration.library (* Must be installed):\nContains the core code for the registration utility\n")
  124. (set #wherelibs "Where do you wish to place the Vapor lib(s), 'Libs:' is default.")
  125.  
  126. (set #wanticons "\nDo you wish to install the default graphics (for buttons) for Microdot-II?\n")
  127. (set #no " No")   (set #yes " Yes")
  128.  
  129. ;********************************************************************
  130. ; Hello
  131. ;********************************************************************
  132. (message #about)
  133. (welcome) 
  134.  
  135. ;********************************************************************
  136. ; MUI installed?
  137. ;********************************************************************
  138. (if (< (exists "mui:") 2)  (message #nomui) )
  139.  
  140. ;********************************************************************
  141. ; Check Last ENV
  142. ;********************************************************************
  143. (if (> (exists "env:Vapor/MD2_LASTUSEDDIR") 0) 
  144.  (
  145.   (set lastdir (getenv "Vapor/MD2_LASTUSEDDIR"))
  146.   (set lastdirlen (strlen lastdir))
  147.   (set tricklen (+ 1 (strlen (fileonly lastdir))))
  148.   (set lastdir (substr lastdir 0 (- lastdirlen tricklen) ) )
  149.  )
  150.  (set lastdir 0)
  151. )
  152.  
  153. ;********************************************************************
  154. ; Check on New installer 
  155. ;********************************************************************
  156. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can. The MicroDot installer will need it. Older installers might fail.")
  157. (set InstallerVer 0)
  158. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  159. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  160. (set current_installer "43.3")
  161. (if (< InstallerVer current_installer) (message #updateinstaller) )
  162.  
  163.  
  164. ;********************************************************************
  165. ; Ask where to put MicroDot & Make dir if needed
  166. ;********************************************************************
  167. (set Package (getassign "AmiTCP"))
  168. (if (= Package "") (set Package (getassign "Inet")) )
  169. (if (<> lastdir 0) (set Package lastdir))
  170.  
  171. (set MicroDotdir  (askdir (prompt #whereMicroDot)
  172.                (help   #whereMicroDot)
  173.                     (default Package)
  174.                )  
  175. )
  176.  
  177. (set where MicroDotdir)
  178.  
  179. (if (= 1 (exists (tackon where "MicroDot") ) ) 
  180.   (
  181.     (set vernum1 (getversion (tackon where "MicroDot") ))
  182.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  183.     (set MicroDot_old (cat ver1 "." rev1))
  184.  
  185.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  186.                   (cat "MicroDot" MicroDot_old) #filethere4 (tackon MicroDotdir "MicroDot") )
  187.     )
  188.     
  189.  
  190.     (copyfiles (source (tackon where "MicroDot"))
  191.                (dest where) 
  192.                (infos)
  193.                (newname (cat "MicroDot" MicroDot_old))
  194.     )
  195.     
  196.     (delete (tackon MicroDotdir "MicroDot") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  197.     
  198.  
  199.     (if (< (exists (tackon MicroDotdir "MicroDot2")) 2) (makedir (tackon MicroDotdir "MicroDot2") (infos)) )    
  200.  
  201.     (copyfiles (source (tackon where (cat "MicroDot2" MicroDot_old) ))
  202.                        (dest (tackon MicroDotdir "MicroDot2")) 
  203.                        (infos)
  204.                
  205.     )
  206.  
  207.     (delete (tackon where (cat "MicroDot2" MicroDot_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  208.  
  209.     ;(set firsttime 1)
  210.  
  211.   )
  212. )
  213.  
  214. (if (< (exists (tackon MicroDotdir "MicroDot2")) 2) (makedir (tackon MicroDotdir "MicroDot2") (infos)) )
  215.  
  216. ;********************************************************************
  217. ; copy rooticon if there
  218. ;********************************************************************
  219. (set pathI @icon)  (set pathIlen (strlen pathI))
  220. (set Inamelen (fileonly @icon))
  221. (set Inamelen (+ (strlen Inamelen) 1) )
  222. (set pathI (substr pathI 0 (- pathIlen Inamelen) ) )
  223.  
  224. (if (exists (cat pathI ".info"))
  225.   (copyfiles (source (cat pathI ".info")) (dest (tackon "/" where)) (newname "MicroDot2.info") (optional "nofail") ) 
  226. )
  227.  
  228. (set where (tackon MicroDotdir "MicroDot2"))
  229. (set @default-dest where)
  230.  
  231. ;********************************************************************
  232. ; Check for MicroDot020 requs
  233. ;********************************************************************
  234. (set ver 0)
  235. (if (exists "mui:mui") 
  236.  (
  237.   (set vernum (getversion "mui:mui") )
  238.   (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  239.  
  240.   (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  241.   (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  242.   (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  243.   (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  244.   (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  245.   (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  246.   (if (= ver 19) (set muiver "3.8") )  (if (= ver 20) (set muiver "3.9") )
  247.   (if (= ver 21) (set muiver "4.0") )  (if (= ver 22) (set muiver "4.1") )
  248.  )
  249. )
  250.  
  251. (if (< ver 19)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  252. (if (< osver 39) ( (message (cat #need-os workbench #000used)) (set cpuPick 0) ))
  253.  
  254. ;********************************************************************
  255. ; Check for old & backup
  256. ;********************************************************************
  257. (if (exists (tackon where "MicroDot")) 
  258.   (
  259.       (set vernum1 (getversion (tackon where "MicroDot") ))
  260.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  261.       (set MicroDot_old (cat ver1 "." rev1))
  262.  
  263.       (set keeper  (askchoice (choices  (cat #backuptoXXX MicroDot_old "'")  #copyover)
  264.                      (prompt #MicroDotfound)
  265.                  (help   #MicroDotfound)
  266.                      (default 0)
  267.                )
  268.       )    
  269.  
  270.  
  271.       (if (= keeper 0)
  272.          (copyfiles (source (tackon where "MicroDot"))
  273.                      (dest where) 
  274.                      (infos)
  275.                      (newname (cat "MicroDot" MicroDot_old))
  276.          )
  277.       )          
  278.  
  279.       (set firsttime 1)
  280.     
  281.   )
  282. )
  283.  
  284. ;********************************************************************
  285. ; Copy over correct MicroDot and Icon if wanted
  286. ;********************************************************************
  287. ;(set gcpu 0)
  288. ;(if (AND (> #cpu 1) (exists ("MicroDot020")) ) (set gcpu 1) ) 
  289.  
  290. ;(set cpuPick (askchoice (choices "68000" "68020")
  291. ;             (prompt #askcpu)
  292. ;                     (help   #askcpu)
  293. ;                   (default gcpu)
  294. ;      )
  295. ;)
  296. ;
  297. ;(if (AND (= cpuPick 1) (exists ("MicroDot020")) )
  298. ; (copyfiles (source "MicroDot020") (dest where) (newname "MicroDot") (optional "nofail") )
  299.  (copyfiles (source "MicroDot") (dest where) (optional "nofail") )
  300. ;)
  301.  
  302. ;(if (AND (= cpuPick 1) (= (exists ("MicroDot020")) 0) )
  303. ; (message #no020found)
  304. ;)
  305.  
  306. (if (= firsttime 0)  (copyfiles (source "MicroDot.info") (dest where) (optional "nofail") ) )
  307.  
  308. (if (= keeper 0) 
  309.   (
  310.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  311.                            (prompt #newicon)
  312.                        (help   #newicon)
  313.                            (default 0)
  314.             )
  315.    )
  316.   
  317.    (if (= newicon 0) 
  318.      (copyfiles (source "MicroDot.info") (dest where)  (optional "nofail") )
  319.    )
  320.  
  321.   )
  322. )
  323.  
  324. (if (exists ("RegisterMicroDot"))
  325.  (copyfiles (source "RegisterMicroDot") (dest where)  (infos) (optional "nofail") )
  326. )
  327.  
  328. ;********************************************************************
  329. ; Copy MimePrefs
  330. ;********************************************************************
  331. (if (exists "MimePrefs")  
  332.  (
  333.   (if (exists "sys:prefs/MimePrefs" (noreq)) (set mpguess 1) (set mpguess 0))
  334.  
  335.   (set wheremp  (askchoice (choices where "SYS:Prefs")
  336.                            (prompt (cat #wheremp "\n"))
  337.                       (help   #wheremp)
  338.                         (default mpguess)
  339.                 )  
  340.   )
  341.  
  342.   (if (= wheremp 0) (set destmp where) (set destmp "SYS:Prefs"))
  343.  
  344.   (if (= (exists (tackon destmp "MimePrefs.info")) 0)  
  345.    (copylib (source "MimePrefs") (dest destmp) (infos) (optional "nofail") ) 
  346.    (copylib (source "MimePrefs") (dest destmp) (optional "nofail") ) 
  347.   )
  348.  
  349.  )
  350. )
  351.  
  352. ;********************************************************************
  353. ; Select and copy over MicroDot Catalog
  354. ;********************************************************************
  355. (if (> (exists "catalogs") 0) 
  356. (
  357. (set XX 0) (set lan 0)
  358. (foreach "Catalogs" "#?"
  359.  (
  360.   (set XX (+ XX 1)) 
  361.   (textfile (dest (cat "ENV:i.høld." XX)) (append @each-name) ) 
  362.   (if (= lanfound @each-name) (set lan XX))
  363.  
  364.   (if (OR (= (patmatch "#?.c#?" @each-name) 1)  (= (patmatch "#?.read#?" @each-name) 1)) 
  365.      ( (delete (cat "ENV:i.høld." XX)) (set XX (- XX 1))  )
  366.   )
  367.  
  368.  )
  369. )
  370.  
  371. (set l1 "N/A") (set l2 "N/A") (set l3 "N/A") (set l4 "N/A") (set l5 "N/A")
  372. (set l6 "N/A") (set l7 "N/A") (set l8 "N/A") (set l9 "N/A") (set l10 "N/A")
  373. (set l11 "N/A") (set l12 "N/A") (set l13 "N/A") (set l14 "N/A") (set l15 "N/A") 
  374. (set l16 "N/A") (set l17 "N/A") (set l18 "N/A") (set l19 "N/A") (set l20 "N/A") 
  375.  
  376. (set l0 "English")
  377. (if (> (exists ("ENV:i.høld.1")) 0)   (set l1 (getenv "ENV:i.høld.1")) ) (if (> (exists ("ENV:i.høld.2")) 0)   (set l2 (getenv "ENV:i.høld.2")) )
  378. (if (> (exists ("ENV:i.høld.3")) 0)   (set l3 (getenv "ENV:i.høld.3")) ) (if (> (exists ("ENV:i.høld.4")) 0)   (set l4 (getenv "ENV:i.høld.4")) )
  379. (if (> (exists ("ENV:i.høld.5")) 0)   (set l5 (getenv "ENV:i.høld.5")) ) (if (> (exists ("ENV:i.høld.6")) 0)   (set l6 (getenv "ENV:i.høld.6")) )
  380. (if (> (exists ("ENV:i.høld.7")) 0)   (set l7 (getenv "ENV:i.høld.7")) ) (if (> (exists ("ENV:i.høld.8")) 0)   (set l8 (getenv "ENV:i.høld.8")) )
  381. (if (> (exists ("ENV:i.høld.9")) 0)   (set l9 (getenv "ENV:i.høld.9")) ) (if (> (exists ("ENV:i.høld.10")) 0) (set l10 (getenv "ENV:i.høld.10")) )
  382. (if (> (exists ("ENV:i.høld.11")) 0) (set l11 (getenv "ENV:i.høld.11")) )(if (> (exists ("ENV:i.høld.12")) 0) (set l12 (getenv "ENV:i.høld.12")) )
  383. (if (> (exists ("ENV:i.høld.12")) 0) (set l13 (getenv "ENV:i.høld.13")) )(if (> (exists ("ENV:i.høld.14")) 0) (set l14 (getenv "ENV:i.høld.14")) )
  384. (if (> (exists ("ENV:i.høld.15")) 0) (set l15 (getenv "ENV:i.høld.15")) )(if (> (exists ("ENV:i.høld.16")) 0) (set l16 (getenv "ENV:i.høld.16")) )
  385. (if (> (exists ("ENV:i.høld.17")) 0) (set l17 (getenv "ENV:i.høld.17")) )(if (> (exists ("ENV:i.høld.18")) 0) (set l18 (getenv "ENV:i.høld.18")) )
  386. (if (> (exists ("ENV:i.høld.19")) 0) (set l19 (getenv "ENV:i.høld.19")) )(if (> (exists ("ENV:i.høld.20")) 0) (set l20 (getenv "ENV:i.høld.20")) )
  387. (run "delete env:i.høld.#?")
  388.  
  389. (set catalog (askchoice (choices l0) ; l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 l18 l19)            
  390.                         (prompt #whatcat)
  391.                     (help   #whatcat)
  392.                         (default lan)
  393.              )
  394. )
  395.  
  396. (if (= catalog 0)  (set #lcat l0))  
  397. (if (= catalog 1)  (set #lcat l1))  (if (= catalog 2)  (set #lcat l2))  (if (= catalog 3)  (set #lcat l3))  
  398. (if (= catalog 4)  (set #lcat l4))  (if (= catalog 5)  (set #lcat l5))  (if (= catalog 5)  (set #lcat l5))
  399. (if (= catalog 6)  (set #lcat l6))  (if (= catalog 7)  (set #lcat l7))  (if (= catalog 8)  (set #lcat l8))  
  400. (if (= catalog 9)  (set #lcat l9))  (if (= catalog 10) (set #lcat l10)) (if (= catalog 11) (set #lcat l11))
  401. (if (= catalog 12) (set #lcat l12)) (if (= catalog 13) (set #lcat l13)) (if (= catalog 14) (set #lcat l14)) 
  402. (if (= catalog 15) (set #lcat l15)) (if (= catalog 16) (set #lcat l16)) (if (= catalog 17) (set #lcat l17))
  403. (if (= catalog 18) (set #lcat l18)) (if (= catalog 19) (set #lcat l19)) (if (= catalog 20) (set #lcat l20))
  404.  
  405. (if (AND (<> catalog 0) (<> #lcat "N/A"))
  406.  (
  407.   (if (> (exists (cat "Catalogs/" #lcat "/MicroDot.catalog")) 0)
  408.     (
  409.         (set wherecat  (askchoice (choices (tackon where (cat "Catalogs/" #lcat)) (cat "Locale:Catalogs/" #lcat) )
  410.                                   (prompt (cat #wherecat (tackon where (cat "Catalogs/" #lcat)) "\n"))
  411.                             (help   #wherecat)
  412.                                (default 0)
  413.                        )  
  414.         )
  415.  
  416.       (if (= wherecat 1)
  417.         (
  418.          (if (< (exists "Locale:") 2) ( (makedir "sys:Locale") (makeassign "Locale" "sys:Locale") ) )
  419.          (if (< (exists "Locale:Catalogs") 2) (makedir "sys:Locale/Catalogs") )
  420.          (if (< (exists (cat "Locale:Catalogs/" #lcat)) 2) (makedir (cat "sys:Locale/Catalogs/" #lcat)) )
  421.          (copylib (source (cat "Catalogs/" #lcat "/MicroDot.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  422.         )
  423.   
  424.         (
  425.          (if (< (exists (tackon where "Catalogs")) 2) (makedir (tackon where "Catalogs")) )
  426.          (if (< (exists (tackon where (cat "Catalogs/" #lcat)) ) 2) (makedir (tackon where (cat "Catalogs/" #lcat)) ) )
  427.          (copylib (source (cat "Catalogs/" #lcat "/MicroDot.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  428.          (if (exists "Catalogs.info")
  429.            (copyfiles (source "Catalogs.info") (dest where) (optional "nofail") ) 
  430.          )
  431.         )
  432.       )
  433.  
  434.     )
  435.  
  436.     (message (cat "\nCatalogs/" #lcat "/MicroDot.catalog\n\n" #catnofind))
  437.   )
  438.  
  439.  )
  440. )
  441. ); End if Catalog dir
  442. ); 
  443.  
  444. ;********************************************************************
  445. ; Ask and and copy docs if wanted!
  446. ;********************************************************************
  447. (set nodocs 0)
  448.  
  449. (set docs (askoptions (choices "MicroDot.guide" "MicroDot.doc" "MicroDot.readme" "MicroDot.ps" "MicroDot.dvi" )
  450.               (prompt #whatdocs)
  451.                       (help #whatdocs)
  452.                   (default 7)
  453.       )
  454. )
  455.  
  456.  
  457.  
  458. (if (<> docs 0)
  459.  (
  460.    (set docsdir (askdir (prompt #wheredocs)
  461.                (help   #wheredocs)
  462.                     (default where)
  463.                 )  
  464.    )
  465.  
  466.    (if (> (exists "MicroDot.guide") 0) 
  467.     (if (IN docs 0) (copyfiles (source "MicroDot.guide") (dest docsdir) (infos) (optional "nofail") ) )
  468.     ( (set #nofounddocs (cat #nofounddocs "\n\nMicroDot.guide")) (set nodocs 1) )
  469.    )
  470.  
  471.    (if (> (exists "MicroDot.doc") 0) 
  472.     (if (IN docs 1) (copyfiles (source "MicroDot.doc") (dest docsdir) (infos) (optional "nofail") ) )
  473.     ( (set #nofounddocs (cat #nofounddocs "\n\nMicroDot.doc")) (set nodocs 1) )
  474.    )
  475.  
  476.    (if (> (exists "MicroDot.readme") 0) 
  477.     (if (IN docs 2) (copyfiles (source "MicroDot.readme") (dest docsdir) (infos) (optional "nofail") ) )
  478.     ( (set #nofounddocs (cat #nofounddocs "\n\nMicroDot.readme")) (set nodocs 1) )
  479.    )
  480.  
  481.    (if (> (exists "MicroDot.ps") 0) 
  482.     (if (IN docs 3) (copyfiles (source "MicroDot.ps") (dest docsdir) (infos) (optional "nofail") ) )
  483.     ( (set #nofounddocs (cat #nofounddocs "\n\nMicroDot.ps")) (set nodocs 1) )
  484.    )
  485.  
  486.    (if (> (exists "MicroDot.dvi") 0) 
  487.     (if (IN docs 4) (copyfiles (source "MicroDot.dvi") (dest docsdir) (infos) (optional "nofail") ) )
  488.     ( (set #nofounddocs (cat #nofounddocs "\n\nMicroDot.dvi")) (set nodocs 1) )
  489.    )
  490.  
  491.    ;(if (= nodocs 1) (message #nofounddocs) ) 
  492.     
  493.  
  494.  )
  495. )
  496.  
  497. ;********************************************************************
  498. ; Copy AREXX stuff 
  499. ;********************************************************************
  500. (if (> (exists "Rexx") 0)
  501.  (
  502.   (if (< (exists (tackon where "Rexx")) 2) (makedir (tackon where "Rexx") (infos)) )    
  503.   (if (exists "Rexx.info")
  504.     (copyfiles (source "Rexx.info") (dest where) (optional "nofail") ) 
  505.   )
  506.  
  507.   (foreach "Rexx" "#?.AMIRX"
  508.     (copyfiles (source (tackon "Rexx" @each-name)) (dest (tackon where "Rexx")) (infos) (optional "nofail") ) 
  509.   )
  510.  
  511.  )
  512. )
  513.  
  514. ;********************************************************************
  515. ; Copy update Lib if wanted 
  516. ;********************************************************************
  517. (if (> (exists "libs") 0)
  518.  (
  519.   (set libPick (askoptions (choices #lib1 #lib2 #lib3)
  520.               (prompt #updatedlibs)
  521.                       (help   (cat #libhelp1 #libhelp2 #libhelp3))
  522.                     (default 7)
  523.            )
  524.   )
  525.  
  526.   (if (> libPick 0)
  527.    (
  528.     (set wherelibs (askdir (prompt #wherelibs)
  529.                   (help   #wherelibs)
  530.                        (default "LIBS:")
  531.                    )  
  532.     )
  533.     
  534.     (if (IN libPick 0)
  535.      (if (> (exists (tackon "libs" "vapor_update.library")) 0)
  536.       (copylib (source (tackon "libs" "vapor_update.library")) (dest wherelibs) (optional "nofail"))  
  537.      )
  538.     )
  539.  
  540.     (if (IN libPick 1)
  541.      (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)
  542.       (copylib (source (tackon "libs" "vapor_toolkit.library")) (dest wherelibs) (optional "nofail"))  
  543.      )
  544.     )
  545.  
  546.     (if (IN libPick 2)
  547.      (if (> (exists (tackon "libs" "vapor_registration.library")) 0)
  548.       (copylib (source (tackon "libs" "vapor_registration.library")) (dest wherelibs) (optional "nofail"))  
  549.      )
  550.     )
  551.  
  552.    )
  553.  
  554.   )
  555.  )
  556. )
  557.  
  558. ;********************************************************************
  559. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  560. ;********************************************************************
  561. (if (exists "MUI") 
  562.  (
  563.    (if (<> (getassign "mui") "")
  564.    (
  565.      (if (> (exists "mui:libs/mui") 0) 
  566.       (
  567.        (working #updatingmuic)
  568.        (foreach "mui" "#?mcp"
  569.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  570.        )
  571.        (foreach "mui" "#?mcc"
  572.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  573.        )
  574.       )
  575.  
  576.       (message (cat #newermui muiver #nompc)) 
  577.      )
  578.    )
  579.    )
  580.  )
  581. )
  582.  
  583. ;********************************************************************
  584. ; Copy Icons
  585. ;********************************************************************
  586. (if (exists (tackon where "Icons")) (set icguess 0) (set icguess 1))
  587.  
  588. (if (exists "Icons")  
  589.  (
  590.   (set icons    (askchoice (choices #no #yes)
  591.                            (prompt #wanticons)
  592.                       (help   #wanticons)
  593.                         (default icguess)
  594.                 )  
  595.   )
  596.  
  597.   (if (= icons 1)
  598.    (
  599.     (if (< (exists (tackon where "Icons")) 2) (makedir (tackon where "Icons") (infos)) )    
  600.     (if (exists "Icons.info")
  601.       (copyfiles (source "Icons.info") (dest where) (optional "nofail") ) 
  602.     )
  603.     (foreach "Icons" "#?"
  604.       (copyfiles (source (tackon "Icons" @each-name)) (dest (tackon where "Icons")) (optional "nofail") ) 
  605.     )  
  606.    )
  607.   )
  608.  )
  609. )
  610.  
  611. ;********************************************************************
  612. ; Reg stuff 
  613. ;********************************************************************
  614. (procedure checkforkey
  615.  (set foundkey 0)
  616.  (if (exists "MicroDot-2.key" (noreq)) (set foundkey 1) )
  617.  (if (exists (tackon where "MicroDot-2.key") (noreq)) (set foundkey 1) )
  618.  (if (exists (tackon "s:" "MicroDot-2.key") (noreq)) (set foundkey 1) )
  619.  (if (exists (tackon "l:" "MicroDot-2.key") (noreq)) (set foundkey 1) )
  620.  (if (exists (tackon "libs:" "MicroDot-2.key") (noreq)) (set foundkey 1) )
  621.  (if (exists (tackon "keypath:" "MicroDot-2.key") (noreq)) (set foundkey 1) )
  622.  (if (exists (tackon "keyfiles:" "MicroDot-2.key") (noreq)) (set foundkey 1) )
  623.  
  624.  (if (= foundkey 0)
  625.   (set wantkey (askchoice  (choices #insregstuffno #insregstuff)
  626.                        (prompt #installerreg)
  627.                            (help #installerreg)
  628.                        (default 1)
  629.                )
  630.   )
  631.  
  632.   (set wantkey 0)
  633.  )
  634. )
  635.  
  636. (checkforkey)
  637.  
  638. (if (AND (exists "Register-MD2") (= wantkey 1))
  639.  (
  640.   (if (< (exists (tackon where "Register-MD2")) 2) (makedir (tackon where "Register-MD2") (infos)) )    
  641.   (if (exists "Register-MD2.info")
  642.     (copyfiles (source "Register-MD2.info") (dest where) (optional "nofail") ) 
  643.   )
  644.   (set whereR (tackon where "Register-MD2"))
  645.  
  646.  
  647.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" "Svenska" "Polski" "Italiano")
  648.                            (prompt "What Registration Files (Language) would you like to install?")
  649.                        (help   "What Registration Files (Language) would you like to install?")
  650.                         (default 0)
  651.                 )  
  652.   )
  653.  
  654.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  655.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  656.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  657.   (if (= whatreg 3) ((set basereg "Svenska")  (set baseregTT "Svenska")  ) )
  658.   (if (= whatreg 4) ((set basereg "Polski")   (set baseregTT "Polski")  ) )
  659.   (if (= whatreg 5) ((set basereg "Italiano") (set baseregTT "Italiano")  ) )
  660.  
  661.   (if (exists "Register-MD2/RegistrationUtility") 
  662.     (copyfiles (source "Register-MD2/RegistrationUtility")
  663.                (dest whereR) 
  664.     )
  665.   )
  666.  
  667.   (if (exists (tackon "Register-MD2" (cat "Regtool-" basereg ".info")) )
  668.     (copyfiles (source (tackon "Register-MD2" (cat "Regtool-" basereg ".info")) )
  669.                (dest whereR) 
  670.                (newname "RegistrationUtility.info")
  671.     )
  672.   )
  673.  
  674.   (if (exists (tackon "Register-MD2" (cat "Reg_" basereg ".guide")) ) 
  675.     (copyfiles (source (tackon "Register-MD2" (cat "Reg_" basereg ".guide")))
  676.                (dest whereR) 
  677.                (infos)
  678.     )
  679.   )
  680.  
  681.   (if (exists (tackon "Register-MD2" (cat "Reg_" basereg ".doc")) )
  682.     (copyfiles (source (tackon "Register-MD2" (cat "Reg_" basereg ".doc")))
  683.                (dest whereR) 
  684.                (infos)
  685.     )
  686.   )
  687.  
  688.  
  689.  )
  690. )
  691.  
  692. ;********************************************************************
  693. ; copy keyfile if there 
  694. ;********************************************************************
  695. (if (> (exists "MicroDot.Key") 0)
  696.  (copyfiles (source "MicroDot.Key") (dest where) (infos) (optional "nofail") ) 
  697. )
  698.  
  699. ;********************************************************************
  700. ; Check on Setpatch 
  701. ;********************************************************************
  702. (set #updatesetpatch "\nThe installer looked for 'c:setpatch' and did not find it or you have a version lower then 40.16. MicroDot needs version 40.16 to work correctly. You wany want to upgrade soon. (NOTE: if you keep 'setpatch' in a different place than 'c:' and its 40.16 or higher then this message is void.)")
  703.  
  704. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  705. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  706. (set current_setpatch "40.16")
  707. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  708.  
  709.  
  710. ;********************************************************************
  711. ; AmFTP Plug Mabey...  and End Bye 
  712. ;********************************************************************
  713. ;(message #ifyoulike)
  714. (exit #byebye)
  715.